 /*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

 /**
 * Project  : EasyAvatar
 * Package  : net.solosky.easyavatar.api
 * File     : FriendProvider.java
 * Author   : solosky < solosky772@qq.com >
 * Created  : 2011-10-23
 * License  : Apache License 2.0 
 */
package net.solosky.easyavatar.api;

import java.io.IOException;


/**
 *
 * 好友提供接口
 * 提供好友关系和可能认识的人的信息
 *
 * @author solosky <solosky772@qq.com>
 *
 */
public interface FriendProvider {
	
	/**
	 * 登陆之前初始化
	 */
	public void init()
			throws ApiException, IOException;
	
	/***
	 * 获取好友列表
	 * @return 好友列表
	 */
	public FriendList retireMyFriends(String index) 
			throws ApiException, IOException;
	
	/**
	 * 获取可能认识的人
	 * 
	 * @param index	第几页
	 * @throws IOException
	 * @throws ApiException
	 */
	public FriendList retireMayKnowns(String index)
			throws ApiException, IOException;

	/**
	 * 获取好友头像
	 * @param friend 好友对象
	 * @param scale	 图像大小
	 * @throws IOException
	 * @throws ApiException
	 */
	public Avatar retireFriendAvatar(Friend friend, Avatar.Scale scale)
			throws ApiException, IOException;
	
	/**
	 * 获取用户自己的头像
	 * @param scale
	 * @return
	 * @throws ApiException
	 * @throws IOException
	 */
	public Avatar retireMyAvatar(Friend friend, Avatar.Scale scale)
			throws ApiException, IOException;
	
	/**
	 * 获取自己的信息
	 * @return
	 * @throws ApiException
	 * @throws IOException
	 */
	public Friend retireMyInfo() 
			throws ApiException, IOException;
}
